import { ApiProperty, PartialType } from '@nestjs/swagger';
import { CreateUserDto } from './create-user.dto';
import { IsNotEmpty, IsString } from 'class-validator';

export class UpdateUserDto extends PartialType(CreateUserDto) {}
export class UpdateUserPassWordDto {
  @ApiProperty({ description: '旧密码' })
  @IsNotEmpty({ message: '密码必填' })
  @IsString({ message: 'oldPassWord是字符串' })
  oldPassWord: string;

  @ApiProperty({ description: '新密码' })
  @IsNotEmpty({ message: '密码必填' })
  @IsString({ message: 'newPassWord是字符串' })
  newPassWord: string;
}
